de.ueberdosis.mp3info.id3v2
Class FrameAENC

java.lang.Object
  |
  +--de.ueberdosis.mp3info.id3v2.ID3V2Frame
        |
        +--de.ueberdosis.mp3info.id3v2.FrameAENC
All Implemented Interfaces:
Defines

public class FrameAENC
extends ID3V2Frame

Audio encryption This frame indicates if the actual audio stream is encrypted, and by whom. Since standardisation of such encrypion scheme is beyond this document, all "AENC" frames begin with a terminated string with a URL containing an email address, or a link to a location where an email address can be found, that belongs to the organisation responsible for this specific encrypted audio file. Questions regarding the encrypted audio should be sent to the email address specified. If a $00 is found directly after the 'Frame size' and the audiofile indeed is encrypted, the whole file may be considered useless. After the 'Owner identifier', a pointer to an unencrypted part of the audio can be specified. The 'Preview start' and 'Preview length' is described in frames. If no part is unencrypted, these fields should be left zeroed. After the 'preview length' field follows optionally a datablock required for decryption of the audio. There may be more than one "AENC" frames in a tag, but only one with the same 'Owner identifier'.

Owner identifier $00 Preview start $xx xx Preview length $xx xx Encryption info


Field Summary
 
Fields inherited from class de.ueberdosis.mp3info.id3v2.ID3V2Frame
dataChanged, deprecatedSince, legalSince
 
Fields inherited from interface de.ueberdosis.mp3info.Defines
DEFAULT_ENCODING, ID3V2_FOOTER_SIZE, ID3V2_FRAME_HEADER_SIZE, ID3V2_HEADER_SIZE, ID3V2_X_HEADER_SIZE, MP3_FRAME_HEADER_SIZE, SUPPORTED_NUMBER_OF_EXTENDED_FLAG_BYTES, testPositions, VERSION
 
Constructor Summary
FrameAENC(de.ueberdosis.mp3info.id3v2.ID3V2Frame frame)
           
FrameAENC(de.ueberdosis.mp3info.id3v2.ID3V2Frame frm, de.ueberdosis.mp3info.id3v2.DataSource ds)
           
 
Method Summary
 boolean canDisplay()
          Can be displayed
 boolean canEdit()
          Can not be edited
 de.ueberdosis.mp3info.gui.Id3JPanel createJPanel(boolean edit, boolean selfupdate)
          Creates a JPanel to display or edit the contents of the frame.
 byte[] getEncryptionInfo()
           
 java.lang.String getLongName()
           
 java.lang.String getOwnerIdentifier()
           
 int getPreviewLength()
           
 int getPreviewStart()
           
 int legalSince()
          Informs since which version of ID3V2 this Frame is legal Only major versions are supported (eg.
 void setEncryptionInfo(byte[] b)
           
 void setOwnerIdentifier(java.lang.String s)
           
 void setPreviewLength(int l)
           
 void setPreviewStart(int s)
           
 java.lang.String toString()
           
 
Methods inherited from class de.ueberdosis.mp3info.id3v2.ID3V2Frame
containsData, createPanel, deprecatedSince, equals, getData, getDataLengthIndicator, getFileAlterPreservation, getFrameID, getSize, getTagAlterPreservation, getUnsynchronisation, hasGroupingIdentity, isAltered, isCompressed, isEncrypted, isReadOnly, isValid, toByteArray
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FrameAENC

public FrameAENC(de.ueberdosis.mp3info.id3v2.ID3V2Frame frame)

FrameAENC

public FrameAENC(de.ueberdosis.mp3info.id3v2.ID3V2Frame frm,
                 de.ueberdosis.mp3info.id3v2.DataSource ds)
          throws SeekPastEndException
Method Detail

getLongName

public java.lang.String getLongName()

legalSince

public int legalSince()
Description copied from class: ID3V2Frame
Informs since which version of ID3V2 this Frame is legal Only major versions are supported (eg. 4 stands for ID3 v 2.4.0)

Overrides:
legalSince in class ID3V2Frame
Returns:
a number between 0 and (currently) 4. -1 means the actual frame didn't overwrite the method.

toString

public java.lang.String toString()
Overrides:
toString in class ID3V2Frame

getOwnerIdentifier

public java.lang.String getOwnerIdentifier()

setOwnerIdentifier

public void setOwnerIdentifier(java.lang.String s)

getPreviewStart

public int getPreviewStart()

setPreviewStart

public void setPreviewStart(int s)

getPreviewLength

public int getPreviewLength()

setPreviewLength

public void setPreviewLength(int l)

getEncryptionInfo

public byte[] getEncryptionInfo()
Returns:
copy of the contained data

setEncryptionInfo

public void setEncryptionInfo(byte[] b)

canDisplay

public boolean canDisplay()
Can be displayed

Overrides:
canDisplay in class ID3V2Frame

canEdit

public boolean canEdit()
Can not be edited

Overrides:
canEdit in class ID3V2Frame

createJPanel

public de.ueberdosis.mp3info.gui.Id3JPanel createJPanel(boolean edit,
                                                        boolean selfupdate)
Description copied from class: ID3V2Frame
Creates a JPanel to display or edit the contents of the frame. To be overwritten by subclasses. The results of canDisplay / canEdit are only binding for this method (ie. for JPanels). AWT-Panels may or may not be implemented.

Overrides:
createJPanel in class ID3V2Frame
Parameters:
edit - switches between display- (false) and edit-mode (true)
selfupdate - switches if the created component takes care of updating its data or not. Generally this means that the component carries its own update-button.
Of course, selfupdate is useless without edit set to true.
Returns:
a JPanel that can be used to display or edit the contents